package cn.dnui_zjq823.dnuifood_16110100823.model;

import java.util.List;

import cn.dnui_zjq823.dnuifood_16110100823.bean.FoodBean;
import cn.dnui_zjq823.dnuifood_16110100823.iface.SearchIface;
import cn.dnui_zjq823.dnuifood_16110100823.listener.onRetrofitListener;
import cn.dnui_zjq823.dnuifood_16110100823.service.SearchService;
import retrofit2.Call;

/**
 * Created by dell on 2018/12/10.
 */

public class SearchModel extends BaseModel implements SearchIface {
    private SearchService service;
    @Override
    public void getFoodBySearch(String search, final onRetrofitListener listener) {
        service = retrofit.create(SearchService.class);
        Call<List<FoodBean>> call = service.getFoodBySearch(search);
        bindCallback(call, listener, 3);
    }
}